import 'package:flutter/widgets.dart';
import 'color_style_theme.dart';

///字体样式管理类
class TextStyleTheme extends ChangeNotifier {
  static double _correctFontSize = 0.0;

  ///fontSize 自己大小
  ///textColor 文本颜色
  ///fontWeight 是否加粗
  static TextStyle getTextStyle(
      {required BuildContext context, required double fontSize, Color? textColor, FontWeight? fontWeight}) {
    // if (SharedPreferencesKey.VIEW_SEETING == StaticConfig.VIEW_LARGE) {
      _correctFontSize = 15.0;
    // }

    return TextStyle(
      fontSize: fontSize + _correctFontSize,
      color: textColor ?? ColorTheme.of(context).color202326,
      fontWeight: fontWeight ?? FontWeight.w400,
    );
  }

  ///
  static correctFontSize(double value) {
    _correctFontSize = value;
  }
}
